package com.lie.prepare.multi_thread.even_checker;

/**
 * Created by lie on 2018/4/9.
 * 撸个int
 */
public abstract class IntGenerator {
    private volatile boolean isCancelled = false;

    public abstract int next();

    public void stop(){
        isCancelled = true;
    }

    public boolean isCancelled(){
        return isCancelled;
    }
}
